package com.sikaryofficial.backend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sikaryofficial.backend.domain.dto.req.information.ArticleEvaluateReplyListReq;
import com.sikaryofficial.backend.domain.dto.resp.information.ArticleEvaluateReplyDTO;
import com.sikaryofficial.backend.domain.entity.ArticleEvaluateReply;
import com.sikaryofficial.backend.domain.vo.EvaluateReplyCount;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 文章评价回复Mapper接口
 * 
 * @author qinjinyuan
 * @date 2024-03-15
 */
public interface ArticleEvaluateReplyMapper extends BaseMapper<ArticleEvaluateReply>
{
    List<EvaluateReplyCount> countByEvaluateId(@Param("evaluateIds") List<Long> evaluateIds,
                                               @Param("userId") Long userId);

    IPage<ArticleEvaluateReplyDTO> replyList(Page<ArticleEvaluateReplyDTO> customerPage,
                                             @Param("req") ArticleEvaluateReplyListReq req, @Param("userId") Long userId);

    List<ArticleEvaluateReplyDTO> queryByEvaluateId(@Param("evaluateIds") List<Long> evaluateIds,
                                                    @Param("limitNum") int limitNum, @Param("userId") Long userId);
}
